package com.m3839.sdk.common.widget.floatview;

import java.lang.ref.WeakReference;

/**
 * @author chenbaoyang
 * @create 2021/10/30 14: 48
 */
final class DismissRunnable extends WeakReference<HykbFloatView>
        implements Runnable {

    DismissRunnable(HykbFloatView toast) {
        super(toast);
    }

    @Override
    public void run() {
        HykbFloatView view = get();
        if (view != null && view.isShow()) {
            view.cancel();
        }
    }
}